package com.voxel.sense.infomsg.module.user.audit;

import android.view.View;
import android.widget.TextView;

import com.example.com.common.view.recycler.RecyclerAdapter;
import com.voxel.sense.infomsg.R;
import com.voxel.sense.infomsg.data.bean.ConditionBean;

import butterknife.BindView;

/**
 * @author ChenYiYao
 * @date 2018/5/14
 * des :
 */
public class DialogElementAdapter extends RecyclerAdapter<ConditionBean> {
//
//    public DialogAdapter(Context context, List<String> list) {
//        super(context, list, R.layout.item_recycle_flow_drop_down);
//    }
//
//    @Override
//    public void initView(ViewHolder holder) {
//        holder.addView(R.id.text);
//    }
//
//    @Override
//    public void setViewValue(ViewHolder holder, int position) {
//        TextView textView = holder.getTextView(R.id.text);
//        textView.setText(list.get(position));
//    }


    @Override
    protected int getItemViewType(int position, ConditionBean conditionBean) {
        return R.layout.item_recycle_flow_drop_down;
    }

    @Override
    protected ViewHolder<ConditionBean> onCreateViewHolder(View root, int viewType) {
        return new ViewHoder(root);
    }

    static class ViewHoder extends ViewHolder<ConditionBean> {
        @BindView(R.id.text)
        TextView text;
        public ViewHoder(View itemView) {
            super(itemView);
        }

        @Override
        protected void onBind(ConditionBean bean) {
            text.setText(bean.getDesc());
        }
    }

}
